package com.example.demo.mapper;

import com.example.demo.po.Course;
import com.example.demo.po.dto.CourseParam;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.util.StringUtils;

import java.util.List;

@Mapper
public interface CourseMap {

    void SaveCourse(CourseParam courseParam);

    void DeleteCourse(int id);

    void UpdateCourse(CourseParam courseParam);

    List<Course> GetCourse();

    List<Course> GetCourseByAll(String name, String teacherName);
    List<Course> GetCourseByName(String name);
    List<Course> GetCourseByTeacherName(String teacherName);

    List<CourseParam> GetSameTimeCourse(CourseParam courseParam);
    Integer GetCountByTime(String startTime);

    List<Course> GetMyCourse(int teacherid);
    List<Course> SearchMyCourse(int teacherid, String name);

    void SaveChooseCourse(int stuid,int courseid) ;

   Integer GetChooseCourse(int stuid,int courseid);

   int CourseNumDecr(int id);

}
